<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>练习全选</title>
    <script type="text/javascript" src="/js/jquery-3.2.1.js"></script>
    <script type="text/javascript" src="/js/demo/checkbox.js"></script>
</head>
<body>

<div>
    <input type="checkbox" id="basketball">篮球 &nbsp;
    <input type="checkbox" id="football">足球 &nbsp;
    <input type="checkbox" id="billliards">台球 &nbsp;
    <input type="checkbox" id="swiming">游泳 &nbsp;
    <input type="checkbox" id="runing">跑步 &nbsp;
</div>
<input type="checkbox" id="allCheckbox" >全选
<div>
    <input type="button" id="all" value="全选">
    <input type="button" id="empty" value="全不选">
    <input type="button" id="not" value="反选">
</div>
</body>
</html>